package com.e3.sysmg.config.client;

import com.e3.sysmg.config.model.ParameterModel;
import com.e3.template.tgf.TGFEditorDialog;
import com.e3.template.tgf.TGFFormPanel;
import com.e3.web.core.client.GwtAsyncCallback;

public class ParameterEditorDialog extends TGFEditorDialog<ParameterModel> {
	
	private ParameterRPCServiceAsync service = ParameterRPCService.Util.getInstance();

	@Override
	public TGFFormPanel<ParameterModel> createFormPanel() {
		return new ParameterFormPanel();
	}

	@Override
	public void executeNewService(ParameterModel model,	GwtAsyncCallback<ParameterModel> callback) {
		service.newParameter(model, callback);
	}

	@Override
	public void executeModifyService(ParameterModel model,GwtAsyncCallback<ParameterModel> callback) {
		service.modifyParameter(model, callback);
	}

	@Override
	public String[] getNotNullFieldNames() {
		return ParameterHelper.INSTANCE.getNotNullFieldNames();
	}

}
